const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false, //关掉脚手架的语法检查
  // 配置数据代理,解决跨域请求
  devServer: {
    proxy: {
      '/toutiao': {
        target: 'https://www.toutiao.com/',
        ws: true,
        changeOrigin: true,
        pathRewrite: { '^/toutiao': '' }
      },
      '/baidu': {
        target: 'https://news.baidu.com/',
        pathRewrite: { '^/baidu': '' }
      }
    }
  }
})
